<template>
	<div class="taskContent">
		<h3 class="reportTitle">分配任务<span>评阅方式</span></h3>
		<div class="tablebox">
			<table width="100%" cellspacing="0" cellpadding="0">
				<tr>
					<th>序号</th>
					<th>题号</th>
					<th>答题卡总量</th>
					<th>分配学校数</th>
					<!-- <th>分配量任务</th> -->
				</tr>
				<tr v-for="(item,index) in tasklistbox">
					<td>{{index+1}}</td>
					<td>{{item.sourcename}}</td>
					<td>{{item.sourcenum}}</td>
					<td>{{item.schoolnum}}</td>
					<!-- <td><b @click="fixedtask(item.sourcename,item.sourcename3)">修改</b></td> -->
				</tr>
				<tr v-if="tasklistbox.length==0">
					<td colspan="5">加载中...</td>
				</tr>
			</table>
		</div>
		<!-- 评阅方式 -->
		<div class="pyfsBox" v-if="fzishow">
			<div class="pyfsBoxContent">
				<h3>评阅方式<span class="el-icon-close"></span></h3>
				<div class="radiocontent">
					 <el-checkbox v-model="checked">分题组评阅</el-checkbox>
					<!-- <el-radio v-model="radio" label="1">分题组评阅</el-radio> -->
					<!-- <br /> -->
					<!-- <el-radio v-model="radio" label="2">整卷评阅</el-radio> -->
				</div>
				<div class="pyfBcsure">
					<span>保存</span>
					<b>取消</b>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import {taskflagsource} from '../../../api/api.js'
	export default{
		data(){
			return {
				tasklistbox:[],
				checked:false,
				fzishow:false,
			}
		},
		mounted() {
			this.tasklist(this.$route.query.xkid)
		},
		methods:{
			tasklist(id){
				let params={
					navId: id
				}
				taskflagsource(params).then(res=>{
					console.info(res)
					this.tasklistbox = res
				})
			},
			fixedtask(sourcename,sourcename3){
				this.$router.push('/progressstatistics/schooltask?navid='+this.$route.query.xkid+'&sourcename3='+sourcename3+'&sourcename='+sourcename+'&title='+this.$route.query.title)
			}
		},
		watch:{
			// 解决路由跳转同一个页面，携带不同参数，页面不刷新问题
			'$route' (to, from) {
				// 在此处放置你create里的内容（或者mounted里面的内容）
				this.tasklist(this.$route.query.xkid)
			}
		}
	}
</script>

<style scoped>
	.taskContent{
		padding:30px;
	}
	.reportTitle{
		font-size:16px;
		font-weight: normal;
		padding-bottom:20px;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.reportTitle span{
		border: solid 1px #3874FF;
		font-size: 14px;
		padding: 0 15px;
		margin-left: 20px;
		height: 30px;
		line-height: 30px;
		cursor: pointer;
		border-radius:6px;
		color:#3874FF;
	}
	.tablebox table{
		border-top:solid 1px #C5D5F4;
		border-left:solid 1px #C5D5F4;
	}
	.tablebox table tr td,.tablebox table tr th{
		border-bottom:solid 1px #C5D5F4;
		border-right:solid 1px #C5D5F4;
		text-align: center;
		line-height:48px;
	}
	.tablebox table tr th{
		background:#EAF1FF 100%;
		font-size:16px;
		color:#333;
		font-weight:normal;
	}
	.tablebox table tr td b{
		cursor: pointer;
		color:#3874FF
	}
	.pyfsBox{
		width:100%;
		height:100%;
		position:fixed;
		left:0;
		top:0;
		background:rgba(0,0,0,.5)
	}
	.pyfsBoxContent{
		box-sizing: border-box;
		width: 460px;
		height: 304px;
		line-height: 20px;
		border-radius: 10px;
		background-color: rgba(255, 255, 255, 1);
		box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
		position:absolute;
		left:50%;
		top:50%;
		transform: translate(-50%,-50%);
		padding:20px;
	}
	.pyfsBoxContent h3{
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-weight:normal;
		font-size:16px;
		padding-bottom:40px;
	}
	.pyfsBoxContent h3 span{
		font-weight:bold;
		cursor: pointer;
	}
	.radiocontent{
		padding:0 20px;
	}
	.radiocontent >>> .el-radio{
		margin-bottom:25px;
	}
	.pyfBcsure{
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top:70px;
	}
	.pyfBcsure span,.pyfBcsure b{
		display: inline-block;
		width: 103px;
		height: 36px;
		border-radius: 4px;
		font-size:14px;
		color: rgba(255, 255, 255, 1);
		text-align: center;
		line-height:36px;
	}
	.pyfBcsure span{
		background-color: rgba(86, 119, 251, 1);
		margin-right:25px;
	}
	.pyfBcsure b{
		background-color: rgba(164, 173, 179, 1);

	}
</style>